.class public Lrexsee/core/widget/TabButtonRow;
.super Lrexsee/core/widget/Div;
.source "TabButtonRow.java"


# direct methods
.method public constructor <init>(Landroid/content/Context;Lrexsee/core/menu/PopMenu;)V
    .locals 5
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "popMenu"    # Lrexsee/core/menu/PopMenu;

    .prologue
    const/4 v4, 0x0

    .line 11
    invoke-direct {p0, p1}, Lrexsee/core/widget/Div;-><init>(Landroid/content/Context;)V

    .line 12
    iget-object v3, p2, Lrexsee/core/menu/PopMenu;->id:Ljava/lang/String;

    invoke-virtual {p0, v3}, Lrexsee/core/widget/TabButtonRow;->setDivId(Ljava/lang/String;)V

    .line 13
    iget-object v3, p2, Lrexsee/core/menu/PopMenu;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v3}, Lrexsee/core/style/StyleSheet;->clone()Lrexsee/core/style/StyleSheet;

    move-result-object v3

    iput-object v3, p0, Lrexsee/core/widget/TabButtonRow;->styleSheet:Lrexsee/core/style/StyleSheet;

    .line 14
    invoke-virtual {p0}, Lrexsee/core/widget/TabButtonRow;->setDivStyle()V

    .line 15
    new-instance v2, Landroid/widget/LinearLayout;

    invoke-direct {v2, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 16
    .local v2, "layout":Landroid/widget/LinearLayout;
    invoke-virtual {v2, v4}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 17
    iget-object v3, p0, Lrexsee/core/widget/TabButtonRow;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v3}, Lrexsee/core/style/StyleSheet;->getGravity()I

    move-result v3

    invoke-virtual {v2, v3}, Landroid/widget/LinearLayout;->setGravity(I)V

    .line 18
    invoke-virtual {v2, v4}, Landroid/widget/LinearLayout;->setBackgroundColor(I)V

    .line 19
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_0
    iget-object v3, p2, Lrexsee/core/menu/PopMenu;->items:Ljava/util/ArrayList;

    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v3

    if-lt v1, v3, :cond_0

    .line 23
    invoke-virtual {p0, v2}, Lrexsee/core/widget/TabButtonRow;->addChild(Landroid/view/View;)V

    .line 24
    return-void

    .line 20
    :cond_0
    new-instance v0, Lrexsee/core/widget/TabButton;

    iget-object v3, p2, Lrexsee/core/menu/PopMenu;->items:Ljava/util/ArrayList;

    invoke-virtual {v3, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lrexsee/core/menu/PopMenuItem;

    invoke-direct {v0, p1, v3}, Lrexsee/core/widget/TabButton;-><init>(Landroid/content/Context;Lrexsee/core/menu/PopMenuItem;)V

    .line 21
    .local v0, "button":Lrexsee/core/widget/TabButton;
    invoke-virtual {v2, v0}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 19
    add-int/lit8 v1, v1, 0x1

    goto :goto_0
.end method
